package controller;

import java.util.ArrayList;
import model.*;
import view.MainFrame;

/**
 *
 * @author Sacha MASSON
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        final ArrayList<Contact> al = new ArrayList();
          new Thread(){
        @Override
        public void run(){
           LoadFromCSV.load();
        }
      }.start();
      
        
        MainFrame frame;
        frame = new MainFrame(al);
        Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {

            public void run() {
                WriteToCSV.csvwrite(al);
            }
        }));

    }

}
